using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.ObjectMapping;

namespace Shared.Mapster;

[DependsOn(typeof(AbpObjectMappingModule))]
public class MapsterMoudle : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        // 注册Mapster提供程序
        context.Services.AddTransient<IAutoObjectMappingProvider, MapsterAutoObjectMappingProvider>();
    
        // 注册主要的对象映射器
        context.Services.AddTransient<IObjectMapper, MapsterObjectMapper>();
    }
}